package upfileSFTP;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.Properties;

import com.jcraft.jsch.*;

public class UpFile {

	public UpFile(String user,String pass, String host, int port, 
			String	nuevoFile, String rutaFile ){
		
		JSch sftp=new JSch();
		Session sesion=null;
		
		ChannelSftp cnlSftp=null;
		//CESAR IS WORKING OUT.
		
		try {
			sesion =sftp.getSession(user,host,port);
			sesion.setPassword(pass);
			
			Properties prop=new Properties();
			prop.put("StrictHostKeyChecking", "no");
			sesion.setConfig(prop);
			
			sesion.connect();
			
			
			
			
			
		} catch (JSchException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
	}
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
